const sleep = (interval) => new Promise(resolve => setTimeout(resolve, interval))

const QueryToString = (query) => Object.keys(query).map(key => `${key}=${decodeURIComponent(query[key])}`).join('&')

const random = (min, max) => {
    return Math.floor(Math.random() * (max - min + 1)) + min
}

export {
    sleep,
    QueryToString,
    random,
}